﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DefectDBTypes;

namespace Graph
{
    /// <summary>
    /// Interaction logic for DeveloperGraph.xaml
    /// </summary>
    public partial class DeveloperGraph : Window
    {
        private MonitoredDev mw_dev;

        public event PropertyChangedEventHandler PropertyChanged;

        private void FirePropertyChangedEvent(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        public MonitoredDev Developer
        {
            get
            {
                return mw_dev;
            }
            set
            {
                mw_dev = value;
                FirePropertyChangedEvent("Developer");
            }
        }


       

        public DeveloperGraph()
        {
            //InitializeComponent();
            DataContext = this;
        }

        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            Developer d;
            MonitoredDev mc = new MonitoredDev();
            d = new Developer();
            d.Last_Name = "DL1";
            d.First_Name = "DF1";
            mc.Add(d);

            d = new Developer();
            d.Last_Name = "DL2";
            d.First_Name = "DF2";
            mc.Add(d);


            Developer = mc;

        }
    }
}
